package com.dfcd.commonlib.retrofit;

/**
 * 自定义错误信息，统一处理返回处理
 *
 * @author zengyi
 * create at 2017/1/10 9:39
 */
class HttpTimeException extends RuntimeException {


    HttpTimeException(String resultCode, String msg) {
        this(getApiExceptionMessage(resultCode, msg));
    }


    HttpTimeException(String detailMessage) {
        super(detailMessage);

    }


    /**
     * 转换错误数据
     *
     * @param code
     * @return
     */
    private static String getApiExceptionMessage(String code, String msg) {
        String message = msg;
        switch (Integer.parseInt(code)) {
            default:
        }
        return message;
    }

}